package com.zhiyun.message;

import org.json.JSONObject;

import com.zhiyun.net.Response;

public class QueryCallStatusResponse extends Response {

	public static final int WAITTING_CALL = 0;
	public static final int CONNECTING_CALL = 1;
	public static final int CONNECTED = 2;

	public static final int UNKNOW_ERROR = 100;
	public static final int ACALL_HANDOFF = 101;
	public static final int BCALL_HANDOFF = 102;
	public static final int ACALL_REFUSED = 103;
	public static final int BCALL_REFUSED = 104;

	public static final int BALANCE_NOT_ENOGHT = 105;

	public static final int ACALL_NO_ERROR = 106;
	public static final int BCALL_NO_ERROR = 107;

	public static final int ACALL_BUSY = 108;

	public static final int BCALL_BUSY = 109;

	private int statusCode;

	@Override
	protected void decodeBody(JSONObject bodyJSON) throws Exception {

		JSONObject o = bodyJSON.getJSONObject("data");

		this.statusCode = getInt(o, "statusCode");
	}

	public int getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}

}
